<include file="Common:header" />
<body>
<table><tr>
<td width="180" valign="top"><include file="Common:adminpanel" /></td>
<td valign="top" >
<div>
<form name="form1" id="form1" method="post" action="<{:U('sconfigsave')}>">
<table width="100%" cellspacing="1" cellpadding="3" border="0">
			<tr>
				<td height="30" align="right"></td>
				<td></td>
			</tr>
			<?php
			foreach($sellerattrs as $k=>$attr ){
				echo '<tr>
				<td height="30" align="right">'.$attr.'：</td>
				<td> <input name="'.$k.'" type="text" size="50" value="' .$sconfig[$k]. '" /> </td></tr>';
			}
			?>
			<tr>
				<td height="30" align="right">&nbsp;</td>
				<td>
				<input type="submit" name="button3" id="button3" value=" 更新 " />
				</td>
			</tr>
			<tr>
				<td></td>
				<td height="30"   colspan="2">
				<div style="font-family: 微软雅黑,Tahoma; letter-spacing: 2px; display: block;"  id="result"></div>
				</td>
			</tr>
		</table>
		</form>
</div>
</td>
</tr>
</table>	
<script>
// FROM  Submit 

$('#form1').ajaxForm({
    beforeSubmit:  checkForm,  // pre-submit callback
    success:       complete,  // post-submit callback
    dataType: 'json'
});
function checkForm(){
	/*
    if( '' == $.trim($('#title').val())){
        $('#result').html('标题不能为空').show();
        return false;
    }
	*/
    //可以在此添加其它判断
}
function complete(data){
    if (data.status==1){
        $('#result').html(data.info).show().fadeOut(2000);            
    }else{
        $('#result').html(data.info).show();
    }
}
</script>		
</body>
</html>